home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
UTIL
/
SCREEN
/
CURSES01
/
minix
/
c
/
termmisc
< prev
next >
Wrap
Text File
|
1991-05-05
|
3KB
|
115 lines
/****************************************************************/
/* Miscellaneous Terminal routines of the PCcurses package */
/* */
/****************************************************************/
/* This version of curses is based on ncurses, a curses version */
/* originally written by Pavel Curtis at Cornell University. */
/* I have made substantial changes to make it run on IBM PC's, */
/* and therefore consider myself free to make it public domain. */
/* Bjorn Larsson (...mcvax!enea!infovax!bl) */
/****************************************************************/
/* 1.0: Release: 870515 */
/****************************************************************/
/* Modified to run under the MINIX operating system by Don Cope */
/* These changes are also released into the public domain. */
/* 900906 */
/****************************************************************/
#include <curses.h>
#include "curspriv.h"
/* static variables or saving terminal modes */
static bool savedacr;
static bool savedcbr;
static bool savedecho;
static bool savedraw;
/****************************************************************/
/* Fixterm(), resetterm(), saveoldterm, saveterm() gettmode(), */
/* setterm() and baudrate() function dummies for compatibility. */
/****************************************************************/
int fixterm()
{
return(OK);
} /* fixterm */
int resetterm()
{
return(OK);
}
int saveoldterm()
{
return(OK);
} /* saveoldterm */
int saveterm()
{
return(OK);
} /* saveterm */
int gettmode()
{
return(OK);
} /* gettmode */
int setterm(type)
char *type;
{
return(OK);
} /* setterm */
int baudrate()
{
return(19200);
} /* baudrate */
/****************************************************************/
/* Erasechar(), killchar() returns std MSDOS erase chars. */
/****************************************************************/
int erasechar()
{
return(_DCCHAR); /* character delete char */
} /* erasechar */
int killchar()
{
return(_DLCHAR); /* line delete char */
} /* killchar */
/****************************************************************/
/* Savetty() and resetty() saves and restores the terminal I/O */
/* settings. */
/****************************************************************/
int savetty()
{
savedacr = _cursvar.autocr;
savedcbr = _cursvar.cbreak;
savedecho = _cursvar.echo;
savedraw = _cursvar.raw;
return(OK);
} /* savetty */
int resetty()
{
_cursvar.autocr = savedacr;
_cursvar.cbreak = savedcbr;
_cursvar.echo = savedecho;
_cursvar.raw = savedraw;
return(OK);
} /* resetty */
/****************************************************************/
/* Setupterm() sets up the terminal. On a PC, it is always suc- */
/* cessful, and returns 1. */
/****************************************************************/
int setupterm()
{
return(1);
} /* setupterm */